Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calypsoify: Add support for switching to Classic when iframing the block editor. #12163

Merged
merged 4 commits into from
Apr 26, 2019

Conversation

kwight
Copy link
Contributor

@kwight kwight commented Apr 25, 2019

When using WordPress.com to edit a WordPress.com site, we give a menu option in the block editor to easily switch to the Calypso editor. With upcoming support for editing Jetpack sites with the block editor on WordPress.com, this PR will give the same option for Jetpack users.

Note that the changes to modules/calypsoify/class.jetpack-calypsoify.php could have been a little simpler, but these changes bring it more in line with the Calypsoify class active on WP.com; knowing we'll be faced with bringing the two more in sync in the future, keeping them as similar as possible for now seems the prudent approach.

Screen Shot 2019-04-25 at 2 40 41 PM

Testing instructions:

  • Load http://calypso.localhost:3000/block-editor/post/:JPsite (JPSite being your test site with this Jetpack repo installed).
  • Verify the block editor ellipsis menu does not have the "Switch to Classic Editor" item.
  • Switch your Jetpack plugin to this branch.
  • Reload http://calypso.localhost:3000/block-editor/post/:JPsite.
  • Verify the block editor ellipsis menu does have the "Switch to Classic Editor" item.

Proposed changelog entry for your changes:

  • N/A

@kwight kwight requested a review from a team April 25, 2019 21:35
@jetpackbot
Copy link

jetpackbot commented Apr 25, 2019

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: May 7, 2019.
Scheduled code freeze: April 30, 2019

Generated by 🚫 dangerJS against 92ac7fe

@kwight kwight requested a review from a team April 25, 2019 21:38
@kwight kwight self-assigned this Apr 25, 2019
@kwight kwight added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it labels Apr 25, 2019
Copy link
Member

@mmtr mmtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, this worked wonderfully for me!

Note that I had to use a different browser to test, because my usual browser was loading a cached version of the wpcom-block-editor/common.js script don't including the required latest changes we added earlier this week in Automattic/wp-calypso#32421 / D27149-code.

@jeherve jeherve added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! [Feature] Calypsoify and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 26, 2019
@jeherve
Copy link
Member

jeherve commented Apr 26, 2019

This should need a rebase now.

@kwight kwight force-pushed the add/calypsoify-switch-editor-support branch from ab6bcd6 to f5ddad1 Compare April 26, 2019 16:08
@kwight kwight added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Apr 26, 2019
@kwight
Copy link
Contributor Author

kwight commented Apr 26, 2019

Rebased and ready to go again – thanks @jeherve ! 👍

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked well in my tests. I only had 2 comments, that may not be blocking. I'll let you judge.

@kwight kwight merged commit 615756c into master Apr 26, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 26, 2019
@kwight kwight deleted the add/calypsoify-switch-editor-support branch April 26, 2019 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Calypsoify [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants